SET EXCLU OFF
SET PROC TO SOSPRO
SET PROC TO BOXPROC
*** PRINT OUT PROCEDURE JUN 94 -  JUL 95
DR='Q:'
DR1='N:'
F1='ACT_PRO2'
F11='ACT2PRHL'
F2='PROCHL'
SELE 1
SET EXCLU OFF
USE &DR&F1 INDE &DR&F11
SELE 2
SET EXCLU OFF
USE &DR&F2
SELE 1
GO TOP
SET DEVI TO PRINT
@ 0, 2 SAY '      HEALTHLINE ACTIVITY FOR PERIOD '+CMONTH(DATE()-30)+' '+STR(YEAR(DATE()),4)
@ 2, 2 SAY 'CODE   DESCRIPTION                     TOTAL PRICE           # OF USAGE'
BR=4
GRTOT=0
DO WHILE .NOT. EOF()
      IF .NOT. HEALTHLINE
         SKIP
         LOOP
      ENDIF

      PHCD=AREA_CODE+SUB_AREACO+PRO_CODE
      PHNM=SHRT_DESCR

      TOTPRIC=0
      TOTQNTY=0
      DO WHILE AREA_CODE+SUB_AREACO+PRO_CODE=PHCD .AND. .NOT. EOF()
         IF .NOT. HEALTHLINE
            SKIP
            LOOP
         ENDIF
         GRTOT=GRTOT+PROC_HL
         TOTPRIC=TOTPRIC+PROC_HL
         TOTQNTY=TOTQNTY+PROC_X
         SKIP
      ENDDO
      @ BR,2 SAY PHCD
      @ BR,9 SAY PHNM
      DO SAYG WITH BR,41,TOTPRIC,'9,999,999.99','999,999,999'
*      @ BR,41 SAY TOTPRIC PICT '999,999,999'
      @ BR,66 SAY TOTQNTY PICT '999,999'
      SELE 2
      IF FIL_LOCK()
         APPEN BLANK
      ENDIF
      UNLOCK
      IF REC_LOCK()
         REPL PROC_CODE WITH PHCD
         REPL PROC_NAME WITH PHNM
         REPL TOTA_PRIC WITH TOTPRIC
         REPL TOTA_USED WITH TOTQNTY
      ENDIF
      UNLOCK
      SELE 1
      BR=BR+1
      IF BR>57
         @ 0, 2 SAY '      HEALTHLINE ACTIVITY FOR PERIOD '+CMONTH(DATE()-30)+' '+STR(YEAR(DATE()),4)
         @ 2, 2 SAY 'CODE   DESCRIPTION                     TOTAL PRICE           # OF USAGE'
         BR=4
      ENDIF
ENDDO
BR=BR+1
DO SAYG WITH BR,41,GRTOT,'9,999,999.99','999,999,999'
*@ BR,41 SAY GRTOT PICT '999,999,999'
SET DEVI TO SCREE